#!usr/bin/python3
# -*- coding: utf-8 -*-
# @Time     : 2019/1/8 16:01
# @Author   : Yosef-夜雨声烦
# @Email    : wurz529@foxmail.com
# @File     : project_path.py
# @Software : PyCharm Community Edition
import os
import time
from common.configer import ReadConfig

dir_path = os.path.dirname(os.path.dirname(__file__))
# print(dir_path)
log_time = time.strftime('%Y-%m-%d')
report_time = time.strftime("%Y-%m-%d-%H-%M-%S")


class ProjectPath:
    def conf_path(self):
        path = os.path.join(dir_path, "conf", "test.conf")
        return path

    def test_data_data(self):
        path = os.path.join(dir_path, "conf", "test_data.xlsx")
        return path

    def receivers(self):
        path = os.path.join(dir_path, "conf", "receivers.xlsx")
        return path

    def report_path(self):
        report_name = "Test_Report" + report_time + ".html"
        path = os.path.join(dir_path, ReadConfig(self.conf_path()).get_value("report", "file_path"), report_name)
        # path = ReadConfig(self.conf_path()).get_value("report","file_path")+report_name
        return path

    def log_path(self):
        path = os.path.join(dir_path, "result", "logs", log_time + ".log")
        return path


if __name__ == '__main__':
    A = ProjectPath()
    print(A.log_path())
